import React from 'react';

interface EventTime {
  time: string;
  title: string;
  isEven: boolean;
}

interface Event {
  start: EventTime;
  end: EventTime;
}

interface EventTableProps {
  events: string[][];
}

const EventTable: React.FC<EventTableProps> = ({ events }) => {
  return (
    <table cellSpacing="0" className="tb-white">
      <tbody>
        {events.map((event, eventIndex) => (
          <>
            <tr key={`${eventIndex}-start`}>
              <th className={'tdl'}>{event[0]}</th>
              <th className={'tdr'}>{event[1]}</th>
            </tr>
            <tr key={`${eventIndex}-end`}>
              <th className={'tdls'}>{event[2]}</th>
              <th className={'tdrs'}>DPSO {event[3]}</th>
            </tr>
          </>
        ))}
      </tbody>
    </table>
  );
};

export default EventTable;